<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;
use think\model\relation\HasOne;

/**
 * @mixin \think\Model
 */
class EnterpriseMember extends Model
{
    //
    public function userinfo(): HasOne
    {
        return $this->hasOne('user','id','user_id');
    }
    public function role(): HasOne
    {
        return $this->hasOne(Role::class,'id','role_id');
    }
    public function enterprise(): HasOne
    {
        return $this->hasOne(Enterprise::class,'id','enterprise_id');
    }
}
